import 'package:chathouse/pages/expert/service_detail.dart';
import 'package:chathouse/public/Config.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../model/response_bean.dart';
import '../../widgets/base_appbar.dart';

class ConFirmService extends StatefulWidget {
  num serviceId;
  String serviceName;

  ConFirmService(this.serviceId, this.serviceName, {Key? key})
      : super(key: key);

  @override
  _ConFirmServiceState createState() => _ConFirmServiceState();
}

class _ConFirmServiceState extends State<ConFirmService> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: getAppBar(title: "服務需求通知"),
      body: SafeArea(
        child: Container(
          margin: EdgeInsets.only(top: 12.w),
          color: Colors.white,
          width: double.infinity,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            mainAxisSize: MainAxisSize.max,
            children: [
              Text(
                "有一個新的服務需求關於:",
                style: TextStyle(
                    color: Styles.c_333,
                    fontSize: 22.sp,
                    fontWeight: FontWeight.w500),
              ),
              const SizedBox(
                height: 8,
              ),
              Text(
                widget.serviceName,
                style: TextStyle(
                    color: Colors.redAccent,
                    fontSize: 30.sp,
                    fontWeight: FontWeight.w500),
              ),
              const SizedBox(
                height: 100,
              ),
              Text(
                "查看服務",
                style: TextStyle(
                    color: Styles.c_333,
                    fontSize: 22.sp,
                    fontWeight: FontWeight.w500),
              ),
              const SizedBox(
                height: 8,
              ),
              InkWell(
                onTap: () => {
                  //check
                  Get.to(ExpertServiceDetailPage(widget.serviceId))
                },
                child: Container(
                  width: 219.w,
                  height: 52.w,
                  decoration: BoxDecoration(
                      color: Styles.FF9800,
                      borderRadius: BorderRadius.circular(Styles.magin_16)),
                  child: Center(
                    child: Text(
                      "是",
                      style: TextStyle(color: Colors.white, fontSize: 22.sp),
                    ),
                  ),
                ),
              ),
              const SizedBox(
                height: 18,
              ),
              InkWell(
                onTap: () {
                  Navigator.pop(context);
                },
                child: Container(
                  width: 219.w,
                  height: 52.w,
                  decoration: BoxDecoration(
                      color: Styles.c_ccc,
                      borderRadius: BorderRadius.circular(Styles.magin_16)),
                  child: Center(
                    child: Text(
                      "否",
                      style: TextStyle(color: Colors.white, fontSize: 22.sp),
                    ),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
